<template>
  <TypeNav></TypeNav>
  <ListContainer></ListContainer>
  <Recommend></Recommend>
  <Rank></Rank>
  <Like></Like>
  <Floor v-for="(floor) in floorList" :key="floor.id" :list="floor"></Floor>
  <Brands></Brands>
</template>
<script>

import TypeNav from "./TypeNav/TypeNav";
import ListContainer from "./ListContainer/ListContainer";
import Recommend from "./Recommend/Recommend";
import Rank from "./Rank/Rank";
import Like from "./Like/Like";
import Floor from "./Floor/Floor";
import Brands from "./Brand/Brands";
import {mapState} from "vuex/dist/vuex.mjs";

export default {
  name: "Home",
  components: {Brands, Floor, Like, Rank, Recommend, ListContainer, TypeNav},
  mounted() {
    this.$store.dispatch('home/getFloorList');

    // home组件挂载后，获取用户信息，在首页展示
    // this.$store.dispatch('user/getUserInfo')
  },
  computed: {
    ...mapState('home', ['floorList'])
  },
};
</script>

<style scoped>

</style>
